//
//  NSObject+Swizzling.m
//  QXBSystem
//
//  Created by tongbinLi on 16/6/30.
//  Copyright © 2016年 tongbinLi. All rights reserved.
//

#import "NSObject+Swizzling.h"
//#import "AA3DESManager.h"

@implementation NSObject (Swizzling)
//
//+ (void)load {
//    
//    static dispatch_once_t onceToken;
//    dispatch_once(&onceToken, ^{
//        
//        [@"" yy_modelToJSONObject];
//        Method awakeFromNibOriginal = class_getInstanceMethod(self, @selector(yy_modelToJSONObject));
//        Method awakeFromNibCustom = class_getInstanceMethod(self, @selector(li_modelToJSONObject));
//        //Swizzle methods
//        method_exchangeImplementations(awakeFromNibOriginal, awakeFromNibCustom);
//    });
//}
//
//-(id)li_modelToJSONObject{
//    
//    id obj = [self li_modelToJSONObject];
//    
//    if (!obj) return nil;
//    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:obj options:0 error:NULL];
//    if (jsonData.length == 0) return nil;
//    NSString *strObj = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
//    if (![self isKindOfClass:[BaseUploadDataModel class]]) return obj;
//     BOOL encryption = [[self valueForKey:@"h_encryption"] boolValue];
//    if (!encryption) return obj;
//    id newObj = [AA3DESManager getEncryptWithString:strObj keyString:_3DES_KEY ivString:_3DES_IV];
//    return newObj;
//}
@end
